package com.itlong.cloud.property.resource;

import com.itlong.cloud.POJO.DTO.property.PropertyAmountChangeGetPageDTO;
import com.itlong.cloud.POJO.VO.property.PropertyAmountChangeGetPageVO;
import com.itlong.cloud.paymenthub.IPropertyAmountChangeClient;
import com.itlong.cloud.property.service.IPropertyAmountChangeService;
import com.itlong.cloud.utils.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <desc>
 *      物业-资金变动明细暴露接口
 * </desc>
 *
 * @createDate 2018/9/25
 */
@RestController
public class PropertyAmountChangeServiceResource implements IPropertyAmountChangeClient {

    @Autowired
    private IPropertyAmountChangeService iPropertyAmountChangeService;

    /**
     * <desc>
     *      分页获取资金变动明细
     * </desc>
     *
     * @param propertyAmountChangeGetPageDTO 物业-资金变动明细列表查询DTO
     * @return 标准格式化响应结果
     * @author wangzhi
     * @createDate 2018/09/25
     */
    @Override
    @PostMapping(path = "/property/amountChange/getAmountChangeByPage")
    public Page<PropertyAmountChangeGetPageVO> getAmountChangeByPage(@RequestBody PropertyAmountChangeGetPageDTO propertyAmountChangeGetPageDTO) throws Exception{
        return iPropertyAmountChangeService.getAmountChangeByPage(propertyAmountChangeGetPageDTO);
    }
}
